let val;
val = 10;
val = 'hello';

let value: any = 666;
value = true;
value = 'hello';

// type protection
let value2: unknown = 123;
if (typeof value2 === 'function') {
    value2();
}
if (typeof value2 === 'string') {
    value2.toUpperCase();
}
if (value2 instanceof String) {
    console.log(value2.length);
}
